﻿/*
 * SpatialIndexType
 * 
 * initial implementation : 17.7.2011
 *
 * Copyright (c) Adam Sida, asida@centrum.cz.
 * All rights reserved.
 * 
 * for license see Petra.Gis.License.txt
 */

namespace Petra.Gis.DataServices
{
  public static class SpatialIndexType
  {

    /// <summary>
    /// spatial indexation is unsupported
    /// </summary>
    public static readonly string None = "None";



    /// <summary>
    /// simple spatial index where each feature keeps
    /// structure with range/bounds of each feature in feature collection.
    /// <para>
    /// Range is represented by 4 double values (left, bottom, right, top) 
    /// or 2 Coordinates (left, bottom) & (right, top)
    /// where each value is valid coordinate in feature coordinate system.
    /// This method is also called minimum bounding rectangle (MBR).
    /// </para>
    /// </summary>
    public static readonly string BoundingBoxIndex = "BoundingBoxIndex";



    /// <summary>
    /// a bit more complex indexation method. Extra computation is
    /// necessary for data selection. Each feature keeps its position in tree encoded into single binary value, number or string.
    /// <para>
    /// Root element of QuadTree has root range (left, bottom, right, top) given in feature coordinate system coordinates.
    /// Root is divided into 4 tiles, each tile is divided into 4 tiles,... Each tile has its index from range 0-3 + index of parent level tile
    /// </para>
    /// </summary>
    public static readonly string QuadTreeIndex = "QuadTreeIndex";




    /// <summary>
    /// range tree is 2 or 3 dimensional tree of ranges. Range is defined by 2 values (minimum, maximum) for each dimension.
    /// value is double number in feature collection coordinate system.
    /// Range tree is quite complex structure, where features are
    /// grouped by similar position into tree nodes.
    /// </summary>
    public static readonly string RangeTreeIndex = "RangeTreeIndex";




    /// <summary>
    /// similar to quad tree where root range is not recursively splitted by quad, but into
    /// A x B matrix of cells. Each cell has its cell order number in matrix, starting at point closest to origin
    /// of coordinate system and growing horizontaly first, vertically second.
    /// Method also requires extra computation for data selection.
    /// Each feature keeps its position as single number that represents cell order number
    /// into which feature falls by its whole or partially.
    /// Cell size must be same or larger than largest feature MBR.
    /// </summary>
    public static readonly string TileIndex = "TileIndex";



  
    /// <summary>
    /// combination of MBR and Tiles. This combination gives higher precision for data selection
    /// </summary>
    public static readonly string TileAndBoundsIndex = "TileAndBoundsIndex";


  }

}
